package com.proton.carepatchtemp.adapter;

import android.support.v7.widget.RecyclerView;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Api on 2016/10/9.
 */

public abstract class BaseAdapter<mViewHolder extends RecyclerView.ViewHolder> extends RecyclerView.Adapter<mViewHolder> {
    protected List datas = new ArrayList();

    public BaseAdapter() {
        this.datas = new ArrayList();
    }

    public BaseAdapter(List datas) {
        this.datas = datas;
    }

    public List getDatas() {
        return datas;
    }

    public void setDatas(List datas) {
        this.datas = datas;
    }

    @Override
    public int getItemCount() {
        return datas == null ? 0 : datas.size();
    }
}
